package com.lv.service.dialog

import android.content.Context
import android.view.View
import android.widget.ImageView
import android.widget.TextView
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.lv.common.imp.OnPositionTListener
import com.lv.service.R
import com.lv.service.adapter.RecyclerSelectedAdapter
import com.lv.service.bean.CommonSelectedBean
import com.lxj.xpopup.core.BottomPopupView

/**
 * 作者： ygx
 * 创建日期：2022/10/10 10:32 AM
 * 签名： 天行健，君子以自强不息；地势坤，君子以厚德载物。
 * -    _              _           _     _   ____  _             _ _
 * -   / \   _ __   __| |_ __ ___ (_) __| | / ___|| |_ _   _  __| (_) ___
 * -  / _ \ | '_ \ / _` | '__/ _ \| |/ _` | \___ \| __| | | |/ _` | |/ _ \
 * - / ___ \| | | | (_| | | | (_) | | (_| |  ___) | |_| |_| | (_| | | (_) |
 * -/_/   \_\_| |_|\__,_|_|  \___/|_|\__,_| |____/ \__|\__,_|\__,_|_|\___/
 *
 *
 * You never know what you can do until you try !
 * ----------------------------------------------------------------
 * 描述：底部公共list选择器
 */
class CamarePopupView(
    private val mContext: Context,
    private val mPositionTListener: OnPositionTListener<Int>? = null
) :
    BottomPopupView(mContext) {
    private var viewTop: View? = null
    private var tvCancle: TextView? = null
    private var tvCamare: TextView? = null
    private var tvPhoto: TextView? = null

    override fun getImplLayoutId(): Int {
        return R.layout.camare_popup
    }

    override fun onCreate() {
        super.onCreate()
        viewTop = findViewById<View>(R.id.view_top)
        tvCamare = findViewById<TextView>(R.id.tv_camare)
        tvPhoto = findViewById<TextView>(R.id.tv_photo)
        tvCancle = findViewById<TextView>(R.id.tv_cancel)
        initView()
        initEvnet()
    }

    private fun initView() {


    }

    private fun initEvnet() {

        viewTop?.setOnClickListener {

            dismiss()
        }
        tvCamare?.setOnClickListener {
            mPositionTListener?.onClick(0, 0)
            dismiss()
        }
        tvPhoto?.setOnClickListener {
            mPositionTListener?.onClick(1, 1)
            dismiss()
        }

        tvCancle?.setOnClickListener {
            dismiss()
        }
    }


    override fun onDestroy() {
        super.onDestroy()
    }

    override fun beforeDismiss() {
        super.beforeDismiss()


    }

}